<template>
    <Layout>
        <div>
            <el-card class="box-card">
                <p>
                    <el-descriptions title="广西标准化协会团体标准发布统计表" :column="1" border>

                    </el-descriptions>
                </p>
                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="200px" class="demo-ruleForm">
                    <el-form-item label="序号">
                        <span>{{ list.id }}</span>
                    </el-form-item>
                    <el-form-item label="姓名" prop="standardName">
                        <el-input v-model="ruleForm.name"></el-input>
                    </el-form-item>
                    <el-form-item label="单位名称" prop="standardNature">
                        <el-input v-model="ruleForm.unitName"></el-input>
                    </el-form-item>
                    <el-form-item label="证书编号" prop="formulate">
                        <el-input v-model="ruleForm.pid"></el-input>
                    </el-form-item>
                    <el-form-item label="签字" prop="formulate">
                        <el-input v-model="ruleForm.sign"></el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" @click="submitForm('ruleForm')">立即修改</el-button>
                        <el-button @click="resetForm">返回</el-button>
                    </el-form-item>
                </el-form>

            </el-card>


        </div>
    </Layout>
</template>
<script>
import axios from 'axios';
import Layout from '@/components/Layout.vue';

export default {
    data() {
        return {
            list: [],
            ruleForm: {
                id: "",
                name: "",
                unitName: "",
                pid: '',
                sign: ""
            }
        }
    },
    created() {
        const { cid } = this.$route.params
        if (cid != null) {

            axios({
                url: "http://43.143.166.235:8090/register/select?id=" + cid
            }).then(res => {
                console.log(res)
                this.list = res.data
                this.ruleForm.name = res.data.name
                this.ruleForm.unitName = res.data.unitName
                this.ruleForm.pid = res.data.pid
                this.ruleForm.sign = res.data.sign
            })
        }
    },
    components: {
        Layout
    }
}
</script>
<style>
.box-card {}
</style>